<?php
hc_core_ClassLoader::load('halo_AbstractViewHelperMapping');
hc_core_ClassLoader::load('substrate_stones_IContextAware');
class halo_SimpleViewHelperMapping extends halo_AbstractViewHelperMapping implements substrate_stones_IContextAware {
    protected $context;
    protected $mappings;
    public function __construct(array $mappings) {
        $this->mappings = $mappings;
    }
    public function informAboutContext(substrate_Context $context) {
        $this->context = $context;
    }
	public function getViewHelper($name) {
        if ( array_key_exists($name, $this->mappings) ) {
            if ( $this->context->exists($this->mappings[$name]) ) {
                return $this->context->get($this->mappings[$name]);
            }
        }
        return null;
    }
    public function getViewHelperNames() {
        return array_keys($this->mappings);
    }
}
?>
